package com.myosw.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.myosw.entity.PageShow;
import com.myosw.pojo.POJO;
import com.myosw.pojo.Urls;

public class ServiceService 
{
			public boolean save(Urls urls)
			{
				Urls bean = new Urls();
				Map<String, Object> map = new HashMap<String, Object>();
				map.put("url", urls.getUrl());
				if(bean.get(map )==null)
					return urls.save()>0?true:false;
				return false;
				
			}
			
			
			public PageShow getUrls(int page,int size) 
			{
				Urls bean = new Urls();
				List<Urls> list = (List<Urls>) bean.list(page, size);
				return new PageShow(list, page, size, bean.totalCount());
				
			}
			
}
